﻿package com.eitb.programas.streamingTest{
	import flash.display.*;
	import flash.events.*;
	import flash.text.*;
	import flash.media.*;
	import flash.utils.*;
	import flash.net.*;
	import flash.geom.*;

	import org.openvideoplayer.net.*;
	import org.openvideoplayer.events.*;

	import com.eitb.programas.streamingTest.literales.*;
	import com.eitb.programas.streamingTest.properties.*;
	import com.eitb.programas.streamingTest.botones.*;
	import com.eitb.botones.*;
	import com.eitb.literales.*;
	import com.eitb.bitmaps.*;
	import com.eitb.programas.*;
	import com.eitb.properties.*;
	import com.eitb.rutas.*;
	import com.eitb.imagenes.*;
	import com.eitb.cargadores.*;
	import com.eitb.events.*;
	import com.eitb.geom.*;

	public class DialogoStreaming extends Sprite implements IVistaStreaming {
		private var cStreaming:IControladorStreaming;
//		private var cReproductor:IControladorReproductor;
		private var cCargador:IControladorCargador;
		
		public function DialogoStreaming():void {
		}
		public function initControladorCargador(cCargador:IControladorCargador):void {
			this.cCargador=cCargador;
		}

		public function initControladorStreaming(cStreaming:IControladorStreaming):void {
			this.cStreaming=cStreaming;
		}
		public function initStage(formato:Object):void {
			this.stage.stageWidth=formato.width;
			this.stage.stageHeight=formato.height;
			this.stage.align=formato.align;
			this.stage.scaleMode=formato.scaleMode;
			this.stage.addEventListener(Event.RESIZE, this.cStreaming.onResizeEvent);
		}

		// VISTA STREAMING
		public function getDisplayState():String {
			return this.stage.displayState;
		}
		public function setDisplayState(state:String):void {
			this.stage.displayState=state;
		}
		public function getStageSize():Size {
			return new Size(this.stage.stageWidth, this.stage.stageHeight);
		}
		public function dispatchStageEvent(event:Event):Boolean {
			return this.stage.dispatchEvent(event);
		}
		public function fitScreen():void {
			this.stage.dispatchEvent(new Event(Event.RESIZE));
		}
		public function setVisible(mostrar:Boolean):void {
			this.visible=mostrar;
		}
		public function move(x:Number, y:Number):void {
			this.x = x;
			this.y = y;
		}
		public function getSize():Size {
			return new Size(this.width, this.height);
		}
		// VISTA STREAMING
	}
}